<template>
	<div>
<<<<<<< HEAD
		<Banner></Banner>
		<icons></icons>
		<Tabs></Tabs>
		<Scroll></Scroll>
		<Lunb></Lunb>
		<Ecsoll></Ecsoll>
<<<<<<< HEAD
=======
		<Category></Category>
>>>>>>> 2fb73b0 (vue练习)
=======
		<Banner :propsbanner='bannerList'></Banner>
		<icons :propsicons='Iconslist'></icons>
		<Tabs :proptable='TabsList'></Tabs>
		<Scroll :propscroll='ScrollList'></Scroll>
		<Lunb :propslunb='LunbList'></Lunb>
		<Ecsoll :propspike='SpikeList'></Ecsoll>
		<Category></Category>
		<Fungory></Fungory>
		<Travel></Travel>
		<!-- :propscate='CateList' -->
		<BottomNav></BottomNav>
>>>>>>> d0d9ac1 (首页)
	</div>

</template>

<script>
	 import Banner from './pages/Banner.vue';
	 import icons from './pages/icons.vue';
	 import Tabs from './pages/Tabs.vue';
	 import Scroll from './pages/Scroll.vue';
	 import Lunb from './pages/Lunb.vue';
	 import Ecsoll from './pages/Ecsoll.vue'
<<<<<<< HEAD
<<<<<<< HEAD
=======
	 import Category from './pages/Category.vue'
>>>>>>> 2fb73b0 (vue练习)
=======
	 import Category from './pages/Category.vue'
	 import Travel from './pages/Travel.vue'
	 import BottomNav from '../default/BottomNav.vue'
	 import Fungory from './pages/Fungory.vue'
>>>>>>> d0d9ac1 (首页)
	export default{
		name:'Home',
		components:{
			Banner,
			icons,
			Tabs,
			Scroll,
			Lunb,
<<<<<<< HEAD
<<<<<<< HEAD
			Ecsoll
=======
			Ecsoll,
			Category
>>>>>>> 2fb73b0 (vue练习)
		}
=======
			Ecsoll,
			Category,
			Fungory,
			Travel,
			BottomNav
		},
		data(){
			return{
				bannerList:[],
				SpikeList:[],
				Iconslist:[],
				ScrollList:[],
				LunbList:[],
				TabsList:[],
				CateList:[],
			}
		},
		//created:当前组件创建之后【el挂载之前（标签未渲染），data函数已经完成了初始化】
		//父组件需要将请求的数据给到子组件的话，满足：1data函数已初始化，2响应数据传给子组件（组件渲染）
		//mounted：组件挂载之后【如果接口复杂/多个接口的时候】，优先考虑mounted
		created() {
			//向dataHome.json发起请求
			let that=this
			this.axios.get("http://localhost:8080/api/dataHome.json").then((res)=>{
				let data=res.data.Homemsg[0]
				that.bannerList=data.BannerVue;
				that.SpikeList=data.SpikeVuelist;
				that.Iconslist=data.IconsVue;
				that.ScrollList=data.ScrollbVue;
				that.LunbList=data.LunbVue;
				that.TabsList=data.TabsVue;
				// that.CateList=data.CategoryVue
			}).catch((error)=>{
				console.log(error)
			})
		}

>>>>>>> d0d9ac1 (首页)
	}
</script>

<style>
</style>
